//
// Created by yangy on 2018/7/20.
//

#ifndef SUPERAUDIOPLAYER_WIVIDEO_H
#define SUPERAUDIOPLAYER_WIVIDEO_H

#include "ffmpeg.h"
#include "JavaCallBack.h"
#include "WIPlayState.h"
#include "WIQueue.h"
#include <pthread.h>

class WIVideo {
public:
    int videoIndex;
    AVCodecContext *avCodecContext = NULL;
    AVCodecParameters *avCodecParameters = NULL;
    JavaCallBack *javaCallBack = NULL;
    WIPlayState * playState;
    WIQueue *queue;
    pthread_t play_thread;

    AVRational time_base;

public:
    WIVideo(JavaCallBack *javaCallBack1,WIPlayState * playState1,AVCodecParameters *avCodecParameters);
    void play();
    void realse();
    ~WIVideo();

};


#endif //SUPERAUDIOPLAYER_WIVIDEO_H
